package com.develop.skwen.yourelectricmall.activity;

import com.develop.skwen.ourrules.base.BaseActivity;
import com.develop.skwen.yourelectricmall.activity.adapter.MainFragmentAdapter;
import com.develop.skwen.yourelectricmall.activity.presenter.MainPresenter;
import com.develop.skwen.yourelectricmall.activity.view.MainView;
import com.develop.skwen.yourelectricmall.activity.view.vu.MainVu;
import com.develop.skwen.yourelectricmall.util.TitleBarUtil;

public class MainActivity extends BaseActivity<MainPresenter,MainVu> implements MainPresenter{



    @Override
    protected Class<? extends MainVu> getVuClass() {
        return MainView.class;
    }

    @Override
    protected MainPresenter getPresenter() {
        return this;
    }

    @Override
    protected void onBind() {
        super.onBind();
        MainFragmentAdapter mainFragmentAdapter = new MainFragmentAdapter(getSupportFragmentManager());
        getVu().setAdapter(mainFragmentAdapter);
    }

    @Override
    public void onPageSelected(int position) {
        TitleBarUtil.getInstance().setTitleBarTheme(position,this);
    }
}
